<template>
  <!--    产品说明-->
  <div class="box">
    <div class="boxCenter">
      <ul>
        <li>产品名称：{{ productName }}</li>
        <li>产品说明：{{ productBrief }}</li>
        <li>
          收费说明：{{ referData.empClassName }} {{ referData.chargeExplain }}
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import { getFindOneList, getProductRefer } from "../../assets/js/api";
export default {
  name: "ProductDescriptionToo",
  data() {
    return {
      id: "",
      // 产品名称
      productName: "",
      // 产品说明
      productBrief: "",
      orderNumber: "",
      referData: {}
    };
  },
  created() {
    //获取产品Id
    this.id = sessionStorage.getItem("prductId");
    let orderNumber = sessionStorage.getItem("orderNumber");
    if (orderNumber) {
      this.orderNumber = orderNumber;
    } else {
      this.orderNumber = this.$route.query.orderNumber;
    }
    this.getFindOneList();
    this.getProductRefer();
  },
  methods: {
    // 查询产品说明
    getFindOneList() {
      getFindOneList(this.id).then(res => {
        this.productName = res.data.productName;
        this.productBrief = res.data.productBrief;
      });
    },
    //回去放款参考
    getProductRefer() {
      getProductRefer({ orderNumber: this.orderNumber }).then(res => {
        this.referData = res.data;
      });
    }
  }
};
</script>

<style scoped type="less">
ul {
  text-align: left;
  font-size: 14px;
  padding-left: 10px;
}
li {
  margin-bottom: 10px;
}
</style>
